<!DOCTYPE HTML "-//W3C/DTD HTML 4.01//EN"
          "http://www.w3c.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
  <head>
    <script type="text/javascript" language="javascript">
      var featureList = ['menu', 'xmla', 'xml', 'window', 'tree', 'drag', 'dimmer','rdfstore', 'n3',
      'dav', 'connection', 'ghostdrag','upload', 'quickedit', 'combolist', 'grid', 'dialog', 'json' ];
    </script>
    <script type="text/javascript" src="js/wz_jsgraphics.js"></script>
    <script type="text/javascript" src="js/global.js"></script>
    <script type="text/javascript" src="js/model.js"></script>
    <script type="text/javascript" src="js/xmla.js"></script>
    <script type="text/javascript" src="js/dialogs.js"></script>
    <script type="text/javascript" src="js/webdav.js"></script>
    <script type="text/javascript" src="js/utils.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
    <script type="text/javascript" src="oat/loader.js"></script>
    
    <link type="text/css" rel="stylesheet" href="css/style.css" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8"  />
    <title>Linked Data Mapper(Beta)</title>
  </head>
  
  <body>
    <!-- top menu bar -->
    <ul id="menu">
      <li>
        File
        <ul>
  	      <li id="menu_new_project">
  	        New Project
          </li>
          <li>
            Open
            <ul>
              <li id="menu_open_mp">Mapping File</li>
              <li id="menu_open_dbres">Database Schema</li>
              <li id="menu_open_onto">Ontology Schema</li>
            </ul>
          </li>
  	      <li id="menu_save">Save</li>
          <Li id="menu_generate">Deployment</li>
          <li id="menu_close_project">Close</li>
<!--  	      <hr class="noclose" /> -->
  	      <li id="menu_exit">Exit</li>
        </ul>
      </li>
      <li>
        Edit
        <ul>
  	      <li id="menu_edit_uri">Uri</li>
  	      <li id="menu_edit_name">Name</li>
  	      <li id="menu_delete">Delete</li>
        </ul>
      </li>
      <li>
        View
        <ul>
          <li id="menu_view_sql">MetaSchema Script</li>
          <li id="menu_view_rdf">RDF Data</li>
          <li id="menu_view_isparql">Query in iSPARQL</li>
        </ul>
      </li>
      <li>
        Tools
        <ul>
          <li id="menu_tool_prefix">Prefix Management</li>
          <li id="menu_tool_url_rewrite">URL Rewriting</li>
          <li id="menu_tool_save_opt">Save Preferences</li>
        </ul>
      </li>
      <li>
        Windows
        <ul>
  	      <li>
            Show View
            <ul>
              <li id="menu_view_dbres">DbRes</li>
              <li id="menu_view_onto">OntoSchema</li>
              <li id="menu_view_mu">Show MppingUnits</li>
            </ul>
          </li>
          <li>
            Close View
            <ul>
              <li id="menu_close_db">Database Schema</li>
              <li id="menu_close_onto">Ontology Schema</li>
            </ul>
          <li>Expand Canvas Area</li>
        </ul>
      </li>
      <li>
        Help
        <ul>
  	      <li id="menu_help_help">Help</li>
  	      <li id="menu_help_about">About</li>
        </ul>
      </li>
    </ul>
    
    <div id="viewLayout">
    </div>
    <div id="canvas">
    </div>
    
    <div id="new_project" style="display:none">
      <table>
        <tr>
          <th>Project type</th>
          <td>
            <select id="project_type">
              <option value="mapping" selected="selected">Mapping</option>
              <option value="publish_rdf">Publish RDF</option>
            </select>
          </td>
        </tr>
        <tr>
          <th>XMLA Endpoint: </th>
          <td><input type="text" id="xmla_endpoint" value="/XMLA" /></td> 
        </tr>
        <tr>
          <th>Connection String: </th>
          <td><select id="xmla_dsn"></select></td>
        </tr>
        <tr>
          <th>Username: </th>
          <td><input type="text" id="user" value="demo" /></td>
        </tr>
        <tr>
          <th>Password: </th>
          <td><input type="password" id="password" value="demo" /></td>
        <tr>
        <tr>
          <th>Web Server type: </th>
          <td>
            <select id="login_put_type">
              <option value="http">Http - Basic</option>
              <option value="dav" selected="selected">Http - WebDAV</option>
            </select>
          </td>
        </tr>
        <tr>
          <th>Quad storage name:</th>
          <td>
            <input type="text" id="quad_storage_name" size="10" style="margin-left:10px;" />
          </td>
        </tr>
        <tr>
          <th>Graph name:</th>
          <td>
            <input type="text" id="ms_graph_name" size="10" style="margin-left:10px;" />
          </td>
        </tr>
        <tr>
          <th>Graph Uri</th>
          <td>
            <input type="text" id="ms_graph_uri" size="30" style="margin-left:10px;" />
          </td>
        </tr>
      </table>
    </div>

    <div id="catalog_options" style="display:none">
      <span>Select catalog(s) you want.</span>
      <table style="width:95%">
        <tbody>
          <tr>
            <th style="width:50%">Unselected catalog(s)</th>
            <th style="width:50%">Selected catalog(s)</th>
          </tr>
          <tr>
            <td>
              <select multiple="multiple" id="unselect_catalogs" style="width:90%;height:100px"></select>
            </td>
            <td>
              <select multiple="multiple" id="select_catalogs" style="width:90%;height:100px"></select>
            </td>
          </tr>
          <tr>
            <td><input type="button" value="Select catalog(s)" id="usecatalog"/></td>
            <td><input type="button" value="Unselect catalog(s)" id="unusecatalog" /></td>
          </tr>
        </tbody>
      </table>
    </div>

    <div id="create_iri_class" style="display:none">
      <table>
        <tbody>
          <tr>
            <th style="width:150px;">IRI type: </th>
            <td>
              <div id="iri_select">
                <input type="radio" name="iri_radio" value="iri_const" style="margin-left:10px;"/>Constant IRI
                <input type="radio" name="iri_radio" value="iri_class" style="margin-left:10px;" checked="true" />IRI class function
              </div>
            </td>
            <tr id="const_iri_row" style="display:none">
              <th>IRI: </th>
              <td><input type="text" id="const_iri_value" size="35" style="margin-left:10px;" /></td>
            </tr>
            <tr id="iri_class_row">
              <th>IRI class<br /> function:</th>
              <td>
                <div style="margin-top:5px;">
                  <div>
                    prefix: <select id="iri_class_prefix"></select>
                    name: <input type="text" id="iri_class_name" size="10" />
                  </div>
                  <div>conversion rule:<br />
                    <input type="text" id="iri_convert_rule" size="35" />
                  </div>
                  arguments:<br />
                  <div style="margin-left:5px;">
                    column:<select id="iri_table_column"></select>
                    <br />
                    datatype:<select id="iri_column_datatype"></select>
                    <br />
                    options:<input type="text" id="iri_column_args" size="6" />
                  </div>
                  <div>
                    <input type="button" id="iri_add_column" value="Add" style="margin-left:5px;"/>
                  </div style="margin-left:5px;">
                  <div style="height:20px;background-color:#99ccff;"><span id="iri_column_value"></span></div>
                </div>
              </td>
            </tr>
          </tr>
        </tbody>
      </table>
    </div>

    <div id="prefix_manage" style="display:none">
      <div style="margin-top:10px;">
        shortcut: <input type="text" id="prefix_shortcut" size="6" />
        prefix: <input type="text" id="prefix_prefix" size="25" />
        <div style="float:right;margin-right:20px;">
          <input type="button" id="add_new_prefix" value="Add" />
        </div>
      </div>
      <div id="prefix_list" style="margin-top:10px;height:150px;">
        <br />
        <table id="prefix_table">
          <thead>
            <tr align="center">
              <td width="50">Shortcut</td>
              <td>Prefix</td>
            </tr>
          </thead>
          <tbody></tbody>
        </table>
      </div>
    </div>

    <div id="progress" style="display:none;">
      <div style="height:40px;margin-top:20px;padding:10px;"> 
         <span id="progress_prompt"></span>
      </div>
      <div style="margin:10px;width:380px;border-width:1px;border-style:solid;bordr-color:#000">
        <strong id="progress_bar" style="display:block;font-size:12px;text-align:center;width:0%;background-color:#00d0ff;"></strong>
      </div>
    </div>

    <div id="config_url_rewrite" style="height:300px;display:none;">
      <div style="height:50%;">
        <span style="margin:10px;">Edit URL Rewriting  Rule</span>
        <div>
          <span style="margin-left:10px;">Rule IRI: </span><input type="text" id="url_rewrite_rule_iri" size="10" />
          <span style="marign-left:10px;">Allow update </span><input type="checkbox" id="url_rewrite_allow_update" />
          <span style="margin-left:10px;">Do not continue </span><input type="checkbox" id="url_rewirte_do_not_continue" />
          <span style="margin-left:10px;">Redirect http code </span><input type="text" id="url_rewrite_red_code" size="4" />
        </div>
        <div>
          <span style="marign-left:10px;">Nice match: </span><input type="text" id="url_rewrite_nice_match" size="20" />
          <span style="margin-left:10px;">Accept pattern: </span><input type="text" id="url_rewrite_ac_pattern" size="20" />
        </div>
        <div>
          <span style="margin-left:10px;">Nice parameters: </span><input type="text" id="url_rewrite_nice_params" size="5" />
          <span style="marign-left:10px;">Nice min parameter: </span><input type="text" id="url_rewrite_nice_min" size="4" />
          <span style="margin-left:10px;">Target parameters: </span><input type="text" id="url_rewrite_target_params" size="6" />
        </div>
        <div>
          <span style="margin-left:10px;">Target compose: </span><textarea rows="1" cols="80"  id="url_rewrite_target_compose"></textarea>
        </div>
        <input type="button" id="url_rewrite_save" value="Save"  style="margin-left:20px;"/>
      </div>
      <div id="url_rewrite_rules_list" style="height:35%;">
        <span style="margin:10px;">Defined Rules</span>
        <table id="all_url_rewrite_rules_table" style="margin:10px;width:95%;">
          <thead>
          <tr align="center">
            <td width="80">Rule IRI</td>
            <td width="120">Nice match</td>
            <td>Accept pattern</td>
            <td width="50">Redirect code</td>
          </tr>
          <thead>
            <tbody>
            </tbody>
        </table>
      </div>
    </div>

    <div id="publish_rdf" style="maring:10px;display:none;">
      <span style="marign:10px;padding:5px;fontSize:1.2em;">Publish RDF/OWL Data Wizard</span>
      <div style="">
        <div id="pr_config" style="height:70%;">
          <table style="width:95%;">
            <tr>
              <th>Ontology prefix:</th>
              <td><input type="text" id="pr_onto_prefix" /></td>
            </tr>
            <tr>
              <th>Property prefix:</th>
              <td><input type="text" id="pr_prop_prefix" /></td>
            </tr>
            <tr>
              <th>IRI class prefix</th>
              <td><input type="text" id="pr_iri_prefix" /></td>
            </tr>
            <tr>
              <th>Const IRI string Prefix</th>
              <td><input type="text" id="pr_iri_convert_rule" /></td>
            </tr>
          </table>
        </div>
        <div id="pr_data_sources" style="display:none;height:70%;overflow:auto;">
          <span>select catalogs to trnasfrom</span>
          <table id="pr_ds_table" style="width:95%;">
            <tr align="center">
              <th width="50">Select</th>
              <th>Catalogs</th>
            </tr>
          </table>
        </div>
        <div id="pr_tables" style="display:none;height:70%;overflow:auto;">
          <span></span>
          <table id="pr_table_table" style="width:95%;">
            <tr align="center">
              <th width="10%">Select</th>
              <th width="35%">Table</th>
              <th width="35%">Ontology</th>
              <th>PK datatype</th>
            </tr>
          </table>
        </div>
        <div id="pr_columns" style="display:none;height:70%;width:95%;overflow:auto;">
          <span></span>
          <table id="pr_columns_table" style="width:95%;">
            <tr>
              <th width="10%;">Select</th>
              <th width="25%">Column</th>
              <th width="25%">Property</th>
              <th width="30">Table</th>
            </tr>
          </table>
        </div>
      </div>
      <div style="float:right; margin:5px;">
        <input type="button" value="Next" id="pr_btn_next" style="margin-left;5px;" />
        <input type="button" value="Save" id="pr_btn_save" style="margin-left:5px;" />
        <input type="button" value="Deploy" id="pr_btn_generate" style="margin-left:5px;" />
        <input type="button" value="Cancel" id="pr_btn_cancel" style="margin-left:5px;"  />
      </div>
    </div>

    <div id="about" style="margin:10px;display:none;" align="center">
      <div style="font-size:1.2em;font-weight:bolid;">
        Linked Data Mapper
      </div>
      <br />
      <div style="">
        copyright (c) 2007-2008, Zhejiang Univeristy<br />
        This software is distributed under the license of BSD.
      </div>
      <br />
      <div style="">
        Authors:
        <lu>
          <li>Chengli Xu: superekcah@gmail.com</li>
        </lu>
      </div>
    </div>
    
    <!--Add the load_onto Dialog,which used for Choose the way of Loading Ontology-->
     <div id="load_onto">
        <button id="remote">Remote</button>&nbsp;&nbsp;(Open Onto from a URL)
        <br>
        <button id="default">Default</button>&nbsp;&nbsp;(Open Onto by the default way)
        <br>
        <button id="local">&nbsp;Local&nbsp;</button>&nbsp;&nbsp;(Open a local Onto file from your PC)
    </div>
    <!--Add the remote Dialog,which used for load Ontology from a URI-->
    <div id="remote_onto">
        Please input a URL:<input type="text" size="20" id="remote_uri"></input>     
    </div>
    
    <!--Add the local Dialog,which support for load Ontology from local-->
    <!-- MAX_FILE_SIZE must precede the file input field -->
        <div id="local_onto">
        <form enctype="multipart/form-data" action="upload.php" method="post"> 
        <input type="hidden" name="max_file_size" value="100000"> 
        Please choose The File: 
        <br>
        <input name="userfile" type="file">
        <input type="submit" value="Upload the new file"> 
        </form> 
        <button id="local_open">Open the file you have uploaded</button>
    </div>

  </body>
</html>
